package com.example.studentmanager.mapper;

import com.example.studentmanager.model.Student;
import com.example.studentmanager.model.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.sql.SQLException;
import java.util.List;

/**
 * 针对老师的mapper接口，其主要功能是和*mapper.xml文件对应
 *
 */


@Mapper
@Component
public interface TeacherMapper {
    List<Teacher> selectByTeachCour();
    void insertTeacher(Teacher teacher);
    void deleteTeacher(@Param("teaid") Integer teaid,@Param("name") String name);
    Teacher selectTeacher(@Param("teaid") Integer teaid);
    List<Teacher> selectAll();
    void updateTeacher(Teacher teacher);
    List<Teacher> blurSelectTeacher(String str);

    Integer counts(@Param("col") String searchCol, @Param("val") String searchValue);

    List<Teacher> searchAll(@Param("start") Integer start, @Param("rows") Integer rows, @Param("col") String searchCol, @Param("val") String searchValue) throws SQLException;

}
